const utils = {
    filterObj:function (obj){
        if (!(typeof obj == 'object')) {
            return;
        }

        for ( let key in obj) {
            if (obj.hasOwnProperty(key)
                && (obj[key] == null || obj[key] === undefined || obj[key] === '')) {
                delete obj[key];
            }
        }
        return obj;
    },
    getFileName:function (path){
        if(path.lastIndexOf("\\")>=0){
            let reg=new RegExp("\\\\","g");
            path = path.replace(reg,"/");
        }
        return path.substring(path.lastIndexOf("/")+1);
    }
}

export default utils;